# -*- coding: utf-8 -*-
from django.conf.urls.defaults import *
urlpatterns = patterns('space.views',
    (r'^$','home.index'),
    #消费�?    
    url(r'^customer/$','home.index',{'template_name':'space/customer/index.html'}, name='customer_index'),
    url(r'^customer/orders/$','customer.customer_orders',name='customer_order'),
    (r'^customer/rest/apply/$','customer.restApply'),
    
    #商户
    (r'^rest/$', 'home.index', {'template_name':'space/rest/orders.html'}),
    (r'^rest/orders/$','rest.rest_orders'),
    (r'^rest/(?P<pk>\d+)/update/$','rest.updateRest'),
    
    
    (r'^rest/intr/$','home.index', {'template_name':'space/rest/index.html'}),
    
    (r'^(?P<pk>\d+)/restIntroImg/$','rest.addRestIntroImg'),
    (r'^restIntroImg/(?P<pk>\d+)/update/$','rest.updateRestIntroImg'),
    (r'^restIntroImg/(?P<pk>\d+)/del/$','rest.delRestIntroImg'),
    
    (r'^(?P<pk>\d+)/restAdImg/$','rest.addRestAdImg'),
    (r'^restAdImg/(?P<pk>\d+)/update/$','rest.updateRestAdImg'),
    (r'^restAdImg/(?P<pk>\d+)/del/$','rest.delRestAdImg'),
    
    
    (r'^rest/cuis/$','rest.cuistypes'),
    (r'^rest/cuis/add/$','rest.addCuisType'),
    (r'^rest/cuis/(?P<pk>[a-z0-9-]+)/update/$','rest.updateCuisType'),
    (r'^rest/cuis/(?P<pk>[a-z0-9-]+)/del/$','rest.delCuisType'),
    
    
    (r'^rest/dish/publish/$','rest.addRestDish'),
    (r'^rest/dish/(?P<state>\w+)/$','rest.dishs'),
    (r'^rest/dish/(?P<state>\w+)/(?P<pk>[a-z0-9-]+)/update/$','rest.updateRestDish'),
    (r'^rest/dish/(?P<pk>[a-z0-9-]+)/(?P<state>\w+)/$','rest.rest_dish_shell_unshell'),
    (r'^rest/dish/del/(?P<pk>[a-z0-9-]+)/$','rest.del_rest_dish'),
    
    
    #客服

    (r'^service/$', 'service.listRestApply'),
    (r'^service/rests/apply/','service.listRestApply'),
    (r'^service/rests/(?P<pk>\d+)/audit/$','service.auditRestApply'),
    
    
    
)
